#include <stdio.h>
#include <stdlib.h>
#include "TK.h"

int main(int argc,char* argv[]){//char* argc[] is necessary as a digital type.
	st* pst;
	InitStack(pst);
	int i = 1;
	while(i<argc)
	{
		Push(pst,*argv[i++]);
		printf("%c ",pst->elem[pst->top-1]);
	}
	char *top = (char*)malloc(sizeof(char));

	Pop(pst,top);

	if(!GetTop(pst,top))
	printf("fail to grab the top val!\n");
	else
	printf("%c \n",*top);

	Destroy(pst);
	free(top);
	return 0;	
}

